<?php
use MicroEngine\AcceptanceTester;
$I = We7Utility::$I = new AcceptanceTester($scenario);
We7Utility::login();
//We7Utility::switchAccount(281);

$I->amOnUrl(We7Utility::$domain . 'index.php?c=account&a=post&uniacid=281&acid=269');
$I->click("//a[@data-target='#account']");
$I->makeScreenshot('test_0.png');
$I->seeInPageSource('修改公众号账号');

$accountname = '测试更改名称' . microtime(true);
$I->fillField(array('model' => 'middleAccount.account'), $accountname);
$I->makeScreenshot('test_1.png');

$I->click("#account .btn-primary");

$I->wait(3);
$I->makeScreenshot('test_2.png');
$I->seeInPageSource($accountname);